/**
 * 
 */

package com.pp.admin.common.client.helper;

import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.VerticalPanel;

/**
 * @author pandurang
 */
public class AdminFormTextBox extends Composite {

	private TextBox textBox = new TextBox();

	private HTML errorMessage = new HTML();

	/**
	 * 
	 */
	public AdminFormTextBox() {

		VerticalPanel panel = new VerticalPanel();
		panel.add(textBox);
		panel.add(errorMessage);
		// All composites must call initWidget() in their constructors.
		initWidget(panel);
	}

	/**
	 * @return the textBox
	 */
	public TextBox getTextBox() {

		return textBox;
	}

	/**
	 * @return the errorMessage
	 */
	public HTML getErrorMessage() {

		return errorMessage;
	}

	public void setEnabled(boolean enable) {
		textBox.setEnabled(enable);

	}

	public void setText(String text) {
		textBox.setText(text);
	}
}
